<%@ page language="java"  pageEncoding="UTF-8"%>
<%@ page import="icms.ORM.UserInfo" %>
<%@ page import="icms.service.MenuService" %>
<%@ page import="java.util.*" %>
<html>
<head>
<title>menu</title>
<link rel="stylesheet" href="skin/css/base.css" type="text/css" />
<link rel="stylesheet" href="skin/css/menu.css" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<script language='javascript'>var curopenItem = '1';</script>
<script language="javascript" type="text/javascript" src="skin/js/frame/menu.js"></script>
<base target="main" />
</head>
<body target="main">
<table width='99%' height="100%" border='0' cellspacing='0' cellpadding='0'>
  <tr>
    <td style='padding-left:3px;padding-top:8px' valign="top">
	<%  //根据不同用户得到相应的功能列表
		UserInfo userInfo=(UserInfo)session.getAttribute("admin");
		MenuService menuService=new MenuService();
		ArrayList<ArrayList<String[]>> functionLists=menuService.getFunctionList(userInfo);
	%>

	<%
		for(int i=0;i<functionLists.size();i++){//功能块，第一次循环
	%>
	<%
		ArrayList<String[]> functionList=new ArrayList<String[]>();
		functionList=functionLists.get(i);
		String functionListName=((String[])functionList.get(0))[0];
	%>
	<!-- Item  Start -->
      <dl class='bitem'>
        <dt onClick='showHide("<%= "items"+i %>")'><b><%= functionListName %></b></dt>
        <dd style='display:block' class='sitem' id="<%= "items"+i %>">
          <ul class='sitemu'>
			<% for(int j=1;j<functionList.size();j++){//展开功能列表,第二层循环
				String functionName=((String[])functionList.get(j))[0];
				String functionUrl=((String[])functionList.get(j))[1];
			%>
			<li><a href=<%= functionUrl %> target='main'><%= functionName %></a></li>
			<% 	
				}
			 %>
          </ul>
        </dd>
      </dl>
      <!-- Item  End -->
	<%
		}
	%>
	</td>
  </tr>
</table>
</body>
</html>
